<?php

/*
 * jzp2008
 */

namespace Account\Model;
use Common\Model\BaseModel;

/**
 * Description of MessageModel
 *
 * @author jzp
 */
class MessageModel extends BaseModel{
    protected $_auto = [
        ['create_time', 'time', self::MODEL_INSERT, 'function'],
    ];
    
     protected $_validate = [

    ];

    protected $_scope = [
        
    ];
    
     public function addMessage($title,$content='',$receiveid=0,$rec_type=1,$type=0) {
        $data['title'] = $title;
        $data['content'] = $content;
        $data['rec_type'] = $rec_type;
        $data['type'] = $type;
        $data['receive_id'] = $receiveid;
        $data['create_time'] = time();
        D('Message')->add($data);
        return true;
    }
}
